<template>
    <div>
              <el-form :model="dataForm" ref="dataForm"
                    label-width="130px">
              <div class="boxsty">
                <el-row>
                  <el-col :span="24">
                      <el-col :span="8">
                        <el-form-item label="合同名称" prop="contractName">
                          <el-input readonly v-model="dataForm.contractName" placeholder="合同名称"></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="16">
                        <el-form-item label="合同有效期" required>
                          <el-col :span="10">
                            <el-form-item prop="htYxqq">
                              <el-date-picker readonly v-model="dataForm.htYxqq" type="date" value-format="yyyy-MM-dd"
                                            placeholder="开始日期" style="width: 100%"></el-date-picker>
                            </el-form-item>

                          </el-col>
                          <el-col :span="2">
                            <div class="text-center">至</div>
                          </el-col>
                          <el-col :span="10">
                            <el-form-item prop="htYxqz">
                            <el-date-picker readonly v-model="dataForm.htYxqz" type="date" value-format="yyyy-MM-dd"
                                            placeholder="结束日期" style="width: 100%"></el-date-picker>
                            </el-form-item>
                          </el-col>
                        </el-form-item>
                      </el-col>
                  </el-col>
                  <el-col :span="24">
                    <el-col :span="8">
                      <el-form-item label="审批流程" prop="auditProcess">
                          <el-input readonly v-model="dataForm.contractName" placeholder="审批流程"></el-input>
                        <!-- <el-select v-model="dataForm.auditProcess" placeholder="请选择审批流程" class="xiaLa" style="width:100%" :clearable="true">
                          <el-option v-for="(item,index) in lcspList" :key="index" :label="item.name" :value="item.value"></el-option>
                        </el-select> -->
                      </el-form-item>
                    </el-col>
                    <el-col :span="8">
                      <el-form-item label="签订日期" prop="signDate">
                        <el-date-picker readonly v-model="dataForm.signDate" type="date" value-format="yyyy-MM-dd"
                                        placeholder="签订日期" style="width: 100%"></el-date-picker>
                      </el-form-item>
                    </el-col>
                    <el-col :span="8">
                      <el-form-item label="签订级别" prop="signLevel">
                          <el-input readonly v-model="dataForm.signLevel" placeholder="合同名称"></el-input>
                        <!-- <el-select v-model="dataForm.signLevel" placeholder="请选择签订级别" class="xiaLa" style="width:100%" :clearable="true">
                          <el-option v-for="(item,index) in qdjbList" :key="index" :label="item.name" :value="item.value"></el-option>
                        </el-select> -->
                      </el-form-item>
                    </el-col>
                  </el-col>
                  <el-col :span="24">
                      <el-col :span="8">
                        <el-form-item label="多人合同模式" prop="multiMode">
                            <el-input readonly v-model="dataForm.multiMode" placeholder="多人合同模式"></el-input>
                          <!-- <el-select v-model="dataForm.multiMode" placeholder="请选择多人合同模式" class="xiaLa" style="width:100%" :clearable="true">
                            <el-option v-for="(item,index) in drhtmsList" :key="index" :label="item.name" :value="item.value"></el-option>
                          </el-select> -->
                        </el-form-item>
                      </el-col>
                      <el-col :span="8">
                        <el-form-item label="考核周期" prop="contractCycle">
                            <el-input readonly v-model="dataForm.contractCycle" placeholder="考核周期"></el-input>
                          <!-- <el-select v-model="dataForm.contractCycle" placeholder="请选择考核周期" class="xiaLa" style="width:100%" :clearable="true">
                            <el-option v-for="(item,index) in htzqList" :key="index" :label="item.name" :value="item.value"></el-option>
                          </el-select> -->
                        </el-form-item>
                      </el-col>
                  </el-col>
                <el-col :span="24">
                    <el-form-item label="发约人">
                        <span>{{dataForm.fayueName}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="受约人">
                        <span>{{dataForm.shouyueName}}</span>
                    </el-form-item>
                </el-col>
                </el-row>
              </div>
            </el-form>
            <el-col :span="24">
                <el-table
                style="width: 100%;margin-top:20px"
                :data="tableData"
                border>
                <el-table-column
                    prop="zhibiaoName"
                    header-align="center"
                    align="center"
                    show-overflow-tooltip
                    label="指标名称">
                </el-table-column>
                <el-table-column
                    prop="keyZhibiao"
                    header-align="center"
                    align="center"
                    min-width="180"
                    label="关键业绩指标">
                </el-table-column>
                <el-table-column
                    prop="weight"
                    header-align="center"
                    align="center"
                    min-width="180"
                    label="权重（%）">
                </el-table-column>
                <el-table-column
                    prop="unit"
                    header-align="center"
                    align="center"
                    min-width="180"
                    label="单位">
                </el-table-column>
                <el-table-column
                    prop="shangnianvalue"
                    header-align="center"
                    align="center"
                    min-width="180"
                    label="上年度完成值">
                </el-table-column>
                <el-table-column
                    prop="increaseDecrease"
                    header-align="center"
                    align="center"
                    min-width="180"
                    label="增减幅度">
                </el-table-column>
                <el-table-column
                    prop="targetValue"
                    header-align="center"
                    align="center"
                    min-width="180"
                    label="目标值">
                </el-table-column>
                <el-table-column
                    prop="dataSource"
                    header-align="center"
                    align="center"
                    min-width="180"
                    label="数据来源">
                </el-table-column>
                <el-table-column
                    prop="completeValue"
                    header-align="center"
                    align="center"
                    min-width="180"
                    label="完成值">
                </el-table-column>
                <el-table-column
                    prop="dataProvider"
                    header-align="center"
                    align="center"
                    min-width="180"
                    label="数据提供部门">
                </el-table-column>
                <el-table-column
                    prop="formula"
                    header-align="center"
                    align="center"
                    min-width="180"
                    label="公式">
                </el-table-column>
                <el-table-column
                    prop="seq"
                    header-align="center"
                    align="center"
                    min-width="180"
                    label="排序号">
                </el-table-column>
                </el-table>
            </el-col>
    </div>
</template>

<script>

import { getObj } from '@/api/hetongrenwu/hetongyeji/hetongnd'
import { getList } from '@/api/hetongrenwu/hetongyeji/hetongzb'


export default {
    name:"initiationSigningProcess",
    data(){
        return{
            dataForm:{},
            tableData:[],
            wfYwMain:{}
        }
    },
    methods:{
        init(formInfo,
            formInfoDetailed,
            formData,
            GUID,
            wfYwMain,
            wfYwStream,
            dqYwStream,
            dqTask){
            this.getForm(wfYwMain.ywLyid)
            this.getTable(wfYwMain.ywLyid)
            this.wfYwMain = wfYwMain
        },
        getForm(id){
            getObj(id).then(res => {
                this.dataForm = res.data.data
            })
        },
        getTable(id){
            getList(id).then(res => {
                this.tableData = res.data.data
            })
        },
        getFormData(){
            getObj(this.wfYwMain.ywLyid).then(res => {
                this.$emit("returnFormData", res.data.data);
            })
        }
    }
}
</script>

<style>

</style>
